import request from '@/utils/request';
export async function fetchMenus(params = {}) {
  return request('/amaidan-sys-user/merchants/menu/list', {
    method: 'POST',
    data: params,
  });
}

export async function saveOrUpdateMenus(params = {}) {
  return request('/amaidan-sys-user/merchants/menu/saveOrUpdate', {
    method: 'POST',
    data: params,
  });
}

export async function deleteMenus(params = {}) {
  return request('/amaidan-sys-user/merchants/menu/delete', {
    method: 'POST',
    data: params,
  });
}

export async function searchMenus(params = {}) {
  return request('/amaidan-sys-user/merchants/menu/get', {
    method: 'POST',
    data: params,
  });
}
// 纯菜单树
export async function menuTreeList(params = {}) {
  return request('/amaidan-sys-user/merchants/menu/listMenuTree', {
    method: 'POST',
    data: params,
  });
}
// 菜单 + 按钮树
export async function btnMenuTree(params = {}) {
  return request('/amaidan-sys-user/merchants/menu/listMenuElementTree', {
    method: 'POST',
    data: params,
  });
}
